<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="vtc" uri="/ls-trade-tags"%>
<%@ include file="/common/taglibs.jsp"%>


<html>
<head>
	<title>发布命令给所有设备</title>
	
	<script type="text/javascript">
	

	</script>

</head>
<body>

<div class="content">  
  <div class="pageTitle">发布命令给所有设备</div>
  
  <div class="form1">
  <s:form id="mainForm" name="mainForm" action="programme.action" method="post">
  	<s:hidden name="search"></s:hidden>
    	<table border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td class="sep" ><img src="../images/spacer.gif" style="width:180px;" /></td>
	        <td class="sep" ><img src="../images/spacer.gif" style="width:180px;" /></td>
	        <td class="sep" ><img src="../images/spacer.gif" style="width:180px;" /></td>
	        <td class="sep sep2" ><img src="../images/spacer.gif" /></td>
	      </tr>
	      <tr>
	        <td><label class="fLabel" >设备序列号</label>
	          <div class="fField">
	            <s:textfield name="programme.launchYear" cssStyle="width:150px" cssClass="inputText" maxLength="4" onkeypress="isDigit()" />
	          </div></td>
	        <td><label class="fLabel" >设备名称</label>
	          <div class="fField">
	            <s:textfield name="programme.launchVersion" cssStyle="width:150px" cssClass="inputText"/>
	          </div></td>
	      </tr>
     
        </table>
        
	    <div class="btnSet btnSetTypeB">
		      <div class="left" >
		        <div class="button" >
		          <div class="left" >
		            <div class="right" >
		              <input class="inputButton" type="button" id="searchBtn" name="search" value="Search" onclick="clickBtn('search');"/>
		            </div>
		          </div>
		        </div>
		        
		        <div class="button" >
		          <div class="left" >
		            <div class="right" >
		              <input class="inputButton" type="button" id="clearBtn" name="clear" value="Clear" onclick="clickBtn('clear');"/>
		            </div>
		          </div>
		        </div>
		        
		        <div class="button" >
		          <div class="left" >
		            <div class="right" >
		            <security:authorize access="hasRole('PROGRAMME_MAIN_INSERT')">
		              <input class="inputButton" type="button" id="createBtn" name="create" value="Create" onclick="clickBtn('create')"/>
		              </security:authorize>
		            </div>
		          </div>
		        </div>
		        
	      </div>
      	</div>
    
		<s:if test="%{page!=null&&page.result!=null&&page.result.size()!=0}">
		<div class="sListBorder">
		   <div class="sList">
		     <table width="100%" cellspacing="0" cellpadding="0" border="0" class="sTable">
		       <tbody>
		       <tr>
		         <td style="width: 70px;" class="sTh t">Launch Year </td>
		         <td class="sTh t">Launch Version </td>
		         <td class="sTh t">Programme Code</td>
		         <td class="sTh t">Programme Title</td>
		         <td class="sTh t">Programme Board</td>
		         <td class="sTh t">Discipline</td>
		         <td class="sTh t">Funding Mode </td>
		         <td class="sTh t">Study Mode</td>
		         <td class="sTh t">Programme Type</td>
		         <td class="sTh t">Level of Study</td>
		         <td style="width: 150px;" class="sTh t">Pre-employment / In-Service</td>
		         <td class="sTh t">Programme Status</td>
		         <td class="sTh t">&nbsp;</td>
		         <td class="sTh t">&nbsp;</td>
		       </tr>
		       
		       <s:iterator value="page.result" var="programme" status="st">
		       
		      	  <s:set var="trClass" value="'sRow1'"></s:set>
		    	  <s:if test="#st.index%2==0">
		       	 		<s:set var="trClass" value="'sRow2'"></s:set>
			       	 <s:else>
			       	    <s:set var="trClass" value="'sRow1'"></s:set>
			       	 </s:else>
				  </s:if>
				  
			      <tr class="<s:property value='#trClass'/>">
			         <td class="sCell"><s:property value="#programme.launchYear"/></td>
			         <td class="sCell"><s:property value="#programme.launchVersion"/></td>
			         <td class="sCell">
				         <a href="programme-info.action?programmeId=<s:property value='#programme.id'/>" id="updatePro">
				         	<s:property value="#programme.code"/>
				         </a>
			         </td>
			         <script>
			         //var updatePro = document.getElementById("updatePro");
			         </script>
			         <td class="sCell"><s:property value="#programme.titleLong"/></td>
			         <td class="sCell"><s:property value="#programme.board"/></td>
			         <td class="sCell"><s:property value="#programme.discipline"/></td>
			         <td class="sCell"><vtc:code2label code="#programme.fundingMode"/></td>
			         <td class="sCell"><s:property value="#programme.studyMode"/></td>
			         <td class="sCell"><s:property value="#programme.programmeType"/></td>
			         <td class="sCell"><s:property value="#programme.studylevel"/></td>
			         <td class="sCell"><s:property value="#programme.preEmploymentInService"/></td>
			         <td class="sCell"><s:property value="#programme.status"/></td>
					 <td class="sCell buttonCell">
					 	<div class="button sbtn">
                             <div class="left">
                               <div class="right">
                               <security:authorize access="hasRole('PROGRAMME_MAIN_INSERT')">
                                 <input type="button" onclick="clickBtn('copy','<s:property value='#programme.id'/>')" value="Copy" name="" id="" class="inputButton">
                               </security:authorize>
                               </div>
                             </div>
                         </div>
                      </td>	
                      
					 <td class="sCell buttonCell">
					 	<div class="button sbtn">
                             <div class="left">
                               <div class="right">
                               <security:authorize access="hasRole('PROGRAMME_MAIN_INSERT')">
                                 <input type="button" onclick="clickBtn('revise','<s:property value='#programme.id'/>')" value="Revise" name="" id="" class="inputButton">
                               </security:authorize>
                               </div>
                             </div>
                         </div>
                      </td>	
                                            		         
		      	 </tr>		       
		       </s:iterator>
		     </tbody>
		     </table>
		   </div>
		   
		   <vtc:paging page="%{page}"></vtc:paging>
		 </div>
		</s:if> 
	
	</s:form> 
	</div>

</div>

</body>
</html>